# |Info|
# Written by Bryan O'Connell, February 2013
# Purpose: Prints the fibonacci sequence up to the specified number.
#
# Sample: fibonacci.py [NUM_A]
#
# Params:
#  [NUM_A]: The number you want to see the sequence generated to. If this
#  parameter is not specified, 150 is used as the default stopping point.
#
# |Info| 

import sys

end_num = 150

if len(sys.argv) > 2:
    end_num = sys.argv[1]

a = 0
b = 1
sum = 0

while b < end_num:
    print a
    sum = a + b
    a = b
    b = sum

x = raw_input("\nPress any key ...")
